During the drilling of a wellbore, various fluids are used in the well for a variety of functions. The fluids may be circulated through a drill pipe and drill bit into the wellbore, and then may subsequently flow upward through wellbore to the surface. During this circulation, a drilling fluid may act to remove drill cuttings from the bottom of the hole to the surface, to suspend cuttings and weighting material when circulation is interrupted, to control subsurface pressures, to maintain the integrity of the wellbore until the well section is cased and cemented, to isolate the fluids from the formation by providing sufficient hydrostatic pressure to prevent the ingress of formation fluids into the wellbore, to cool and lubricate the drill string and bit, and/or to maximize penetration rate.
During drilling operations, variations in formation composition may lead to undesirable fluid loss events in which substantial amounts of wellbore fluid are lost to the formation through large or small fissures or fractures in the formation or through a highly porous rock matrix surrounding the borehole. In response to various types of formation damage and fluid loss, wellbore fluids may also be circulated downhole to deliver agents to treat or mitigate such problems. Treatment compositions may be water- or oil-based and may contain weighting agents, surfactants, proppants, viscosifiers, and fluid loss additives depending on the nature of the problem. For example, treatments may include physical treatments that contain viscosifying agents or particulate solids that reduce the mobility of fluids into formation defects or form aggregates that obstruct fractures or pores downhole, or chemical treatments that include polymer- or gel-forming components and cements that harden or set up to produce seals downhole.